The present invention relates to a data communication system and method for data communication between a master station for transmitting commands and receiving responses and slave stations for receiving commands and transmitting responses and, more particularly, to a data communication system and method applied to a case wherein each slave station has a large amount of data, and the contents of the data need to be exchanged only when the contents of the data change, but need not be exchanged in a normal operation.
FIGS. 4, 5A, and 5B show the arrangement of a conventional data communication system and method for data communication between one master station and a plurality of slave stations. The system and method are designed to exchange command data transmitted from the master station to each slave station, and response data transmitted from each slave station to the master station in response to the command data.
In the data communication system shown in FIG. 4, reference numeral 1 denotes a master station including a command control section 11 and designed to transmit command data 3 and receive response data 6; and 2, a slave station including a response control section 10 and designed to transmit a plurality of data D1 to Dn through response data 6 in response to the command data 3. As shown in FIG. 5A, the command data 3 is constituted by a command area 4 in which the identification information of the slave station 2 as a transmission source is set. As shown in FIG. 5B, the response data 6 is constituted by a response data area 7 in which the identification information of the slave station 2 as a transmission source is set, and a data area 9 in which data D1 to Dn are stored.
FIG. 6 shows a sequence of data communication between the master station 1 and the slave station 2 in FIG. 4. The conventional data communication method will be described below with reference to FIG. 6.
Assume that the master station 1 wants to know changes in the data D1 to Dn held by the slave station 2. In this case, in accordance with an instruction from a host control section (not shown) in the master station 1, the command control section 11 transmits command data 41 having the identification information of the slave station 2 stored in the command area 4 to the slave station 2 (step S21).
In response to the command data 41 (step S22), the slave station 2 reads out the data D1 to Dn (step S23), stores the data in the data area 9 and the identification information of the slave station 2 in the response data area 7, and transmits the data as response data 42 (step S24).
The master station 1 receives the response data 42 from the slave station 2 (step S25), reads out all the data D1 to Dn from the data area 9, and stores the data (step S26). Thereafter, the master station 1 compares these latest data with all the data D1 to Dn previously received from the slave station 2, and informs the host control section in the master station 1 of the comparison result (step S27). With this operation, the master station 1 can check changes in the data D1 to Dn in the slave station 2.
Subsequently, the master station 1 checks changes in data held by another station by the same procedure as described above (step S28). After checking processing with respect to each slave station is completed, changes in the data D1 to Dn in the slave station 2 are checked by using command data 43 and response data 44 (steps S29 to S35). Subsequently, data change checking processing is repeatedly performed with respect to each slave station by the same procedure as described above (step S36).
In such a conventional data communication method and system, all the data held by each slave station are read out and transmitted, as response data, to the master station for every checking operation even in a case wherein each slave station has a large amount of data, and the contents of the data need to be known only when the data change, but need not be known in a normal operation. With this operation, since each slave station transmits a large amount of data, a deterioration in transmission efficiency occurs. In addition, the master station reads out all the data received from each station and checks the state of each station by checking changes in data by comparison processing. Therefore, the load on the master station is heavy.